/*
 * Copyright 2010, 2011 mapsforge.org
 *
 * This program is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.mapsforge.map.writer.coastlinealgorithm;

/**
 * Interface which must be implemented to handle all events during polygon creation.
 */
public interface ClosedPolygonHandler {
	/**
	 * Called when an invalid coastline segment has been detected.
	 * 
	 * @param coastline
	 *            the coordinates of the invalid coastline segment.
	 */
	void onInvalidCoastlineSegment(float[] coastline);

	/**
	 * Called when a closed island polygon has been generated.
	 * 
	 * @param coastline
	 *            the coordinates of the closed island polygon.
	 */
	void onIslandPolygon(float[] coastline);

	/**
	 * Called when a valid coastline segment has been detected.
	 * 
	 * @param coastline
	 *            the coordinates of the valid coastline segment.
	 */
	void onValidCoastlineSegment(float[] coastline);

	/**
	 * Called when a closed water polygon has been generated.
	 * 
	 * @param coastline
	 *            the coordinates of the closed water polygon.
	 */
	void onWaterPolygon(float[] coastline);

	/**
	 * Called when a water tile has been detected.
	 */
	void onWaterTile();
}